/*
 * createOrderNew.java
 *
 * Created on March 26, 2006, 10:01 PM
 */

package phs_project;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLData;
import java.sql.Statement;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import java.util.*;

/**
 *
 * @author  nhoc
 */
public class createOrderNew extends javax.swing.JDialog {
    
    /** Creates new form createOrderNew */
    public static Vector roomArray ;
    public createOrderNew(JFrame parent,boolean check,String begin,String end,Vector roomvt) {
        super(parent,check);
        initComponents();
        
        this.roomArray =roomvt;
        PanelKhachQuen.setVisible(false);
        //addItemToTable(Bangkhachhang,"select * from cusjointype");
        //addItemToTable(Bangkhachhang,"select * from rooms");
        //Bangkhachhang.
        addItemTooCombobox(type,"select name from customerstype","");
        addItemTooCombobox(orderType,"select Status_detail from order_Status","");
        customerId.setText(" ");
        firstName.setText("");
        lastName.setText("");
        orderId.setText(" ");
        digitalClock clock = new digitalClock(orderdate);
        this.begindate.setText(begin);
        this.enddate.setText(end);
        String Roomlist ="" ;
        if (roomvt != null) {
            String sqlselect = " select * from rooms ";
            for (int i =0; i< roomvt.size(); i++) {
                Roomlist=Roomlist+ selectDateToString("select roomnumb from rooms where roomid='"+roomvt.get(i).toString()+"'","roomnumb")+",";
                
            }
        }
        SelectedRoom.setText(Roomlist);
        
        
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        GioitinhG = new javax.swing.ButtonGroup();
        CustomerOld = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        orderdate = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        orderId = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        orderType = new javax.swing.JComboBox();
        jLabel20 = new javax.swing.JLabel();
        Note = new javax.swing.JTextField();
        try {
            PanelKhachmoi =(javax.swing.JPanel)java.beans.Beans.instantiate(getClass().getClassLoader(), "phs_project.createOrderNew_PanelKhachmoi");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (java.io.IOException e) {
            e.printStackTrace();
        }
        jLabel2 = new javax.swing.JLabel();
        firstName = new javax.swing.JTextField();
        type = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        idCardNumb = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        visaCardNumb = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        sexMale = new javax.swing.JRadioButton();
        sexFemale = new javax.swing.JRadioButton();
        jLabel7 = new javax.swing.JLabel();
        age = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        country = new javax.swing.JTextField();
        phone = new javax.swing.JTextField();
        email = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        address = new javax.swing.JTextArea();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        detail = new javax.swing.JTextArea();
        jLabel14 = new javax.swing.JLabel();
        customerId = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        begindate = new javax.swing.JTextField();
        enddate = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        SelectedRoom = new javax.swing.JTextArea();
        Khachmoi = new javax.swing.JRadioButton();
        Khachcu = new javax.swing.JRadioButton();
        jToggleButton1 = new javax.swing.JToggleButton();
        lastName = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        PanelKhachQuen = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        Timtenkhach = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        Bangkhachhang = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setAlwaysOnTop(true);
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("T\u1ea1o \u0111\u01a1n h\u00e0ng m\u1edbi"));
        jLabel1.setText("Ng\u00e0y \u0111\u1eb7t");

        jLabel15.setText("M\u00e3 s\u1ed1");

        orderId.setEditable(false);

        jLabel19.setText("Ki\u1ec3u");

        jLabel20.setText("Ghi ch\u00fa th\u00eam");

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel15)
                    .add(jLabel19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(48, 48, 48)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(orderId, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 58, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(orderdate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 144, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(orderType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 170, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(jLabel20)))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Note, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(Note, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 47, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1Layout.createSequentialGroup()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel15)
                            .add(orderId, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabel1)
                            .add(orderdate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel19)
                            .add(orderType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabel20))))
                .addContainerGap())
        );

        jLabel2.setText("H\u1ecd \u0111\u1ec7m");

        firstName.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                firstNameKeyTyped(evt);
            }
        });

        jLabel3.setText("\u0110i c\u00f9ng");

        jLabel4.setText("S\u1ed1 CMT");

        jLabel5.setText("S\u1ed1 h\u1ed9 chi\u1ebfu");

        jLabel6.setText("Gi\u1edbi t\u00ednh");

        GioitinhG.add(sexMale);
        sexMale.setSelected(true);
        sexMale.setText("Nam");
        sexMale.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        sexMale.setMargin(new java.awt.Insets(0, 0, 0, 0));

        GioitinhG.add(sexFemale);
        sexFemale.setText("N\u1eef");
        sexFemale.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        sexFemale.setMargin(new java.awt.Insets(0, 0, 0, 0));

        jLabel7.setText("Tu\u1ed5i");

        jLabel8.setText("\u0110i\u1ec7n tho\u1ea1i");

        jLabel9.setText("Th\u01b0 \u0111i\u1ec7n t\u1eed");

        jLabel10.setText("\u0110\u1ecba ch\u1ec9");

        jLabel11.setText("Qu\u1ed1c t\u1ecbch");

        address.setColumns(20);
        address.setRows(5);
        jScrollPane1.setViewportView(address);

        jLabel12.setText("Ghi ch\u00fa th\u00eam");

        detail.setColumns(20);
        detail.setRows(5);
        jScrollPane2.setViewportView(detail);

        jLabel14.setText("M\u00e3 s\u1ed1");

        customerId.setEditable(false);

        jLabel16.setText("Ph\u00f2ng  ");

        begindate.setEditable(false);

        enddate.setEditable(false);

        jLabel17.setText("T\u1eeb");

        jLabel18.setText("\u0110\u1ebfn");

        SelectedRoom.setColumns(20);
        SelectedRoom.setEditable(false);
        SelectedRoom.setRows(5);
        jScrollPane4.setViewportView(SelectedRoom);

        CustomerOld.add(Khachmoi);
        Khachmoi.setSelected(true);
        Khachmoi.setText("Kh\u00e1ch m\u1edbi");
        Khachmoi.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        Khachmoi.setMargin(new java.awt.Insets(0, 0, 0, 0));
        Khachmoi.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                KhachmoiMouseClicked(evt);
            }
        });

        CustomerOld.add(Khachcu);
        Khachcu.setText("Kh\u00e1ch quen");
        Khachcu.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        Khachcu.setMargin(new java.awt.Insets(0, 0, 0, 0));
        Khachcu.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                KhachcuMouseClicked(evt);
            }
        });

        jToggleButton1.setText("Nh\u1eadp m\u1edbi");
        jToggleButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Quay l\u1ea1i");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel21.setText("T\u00ean");

        org.jdesktop.layout.GroupLayout PanelKhachmoiLayout = new org.jdesktop.layout.GroupLayout(PanelKhachmoi);
        PanelKhachmoi.setLayout(PanelKhachmoiLayout);
        PanelKhachmoiLayout.setHorizontalGroup(
            PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(PanelKhachmoiLayout.createSequentialGroup()
                .addContainerGap()
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(PanelKhachmoiLayout.createSequentialGroup()
                        .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabel4)
                            .add(jLabel9)
                            .add(jLabel12)
                            .add(jLabel17)
                            .add(jLabel18)
                            .add(jLabel5)
                            .add(jLabel8)
                            .add(jLabel21))
                        .add(24, 24, 24)
                        .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(PanelKhachmoiLayout.createSequentialGroup()
                                .add(Khachmoi)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .add(Khachcu))
                            .add(firstName)
                            .add(lastName)
                            .add(idCardNumb)
                            .add(visaCardNumb)
                            .add(phone)
                            .add(email)
                            .add(enddate)
                            .add(begindate)
                            .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                            .add(customerId)))
                    .add(jLabel14))
                .add(31, 31, 31)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel10)
                    .add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel6)
                    .add(jLabel16)
                    .add(jLabel7)
                    .add(jLabel11))
                .add(11, 11, 11)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, age, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, PanelKhachmoiLayout.createSequentialGroup()
                        .add(jToggleButton1)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 45, Short.MAX_VALUE)
                        .add(jButton2))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, PanelKhachmoiLayout.createSequentialGroup()
                        .add(sexMale)
                        .add(7, 7, 7)
                        .add(sexFemale))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane4, 0, 0, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, country, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, type, 0, 193, Short.MAX_VALUE))
                .addContainerGap())
        );
        PanelKhachmoiLayout.setVerticalGroup(
            PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(PanelKhachmoiLayout.createSequentialGroup()
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel14)
                    .add(customerId, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(6, 6, 6)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Khachmoi)
                    .add(Khachcu))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(firstName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(2, 2, 2)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(PanelKhachmoiLayout.createSequentialGroup()
                        .add(25, 25, 25)
                        .add(jLabel4))
                    .add(PanelKhachmoiLayout.createSequentialGroup()
                        .add(5, 5, 5)
                        .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(lastName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabel21))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(idCardNumb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(visaCardNumb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel5))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(phone, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel8))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel9)
                    .add(email, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                    .add(jLabel12))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel17)
                    .add(begindate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel18)
                    .add(enddate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(PanelKhachmoiLayout.createSequentialGroup()
                    .add(97, 97, 97)
                    .add(jLabel10)
                    .add(158, 158, 158)
                    .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jToggleButton1)
                        .add(jButton2)))
                .add(PanelKhachmoiLayout.createSequentialGroup()
                    .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel3)
                        .add(type, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(sexMale)
                        .add(sexFemale)
                        .add(jLabel6))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(age, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jLabel7))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel11)
                        .add(country, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 91, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(PanelKhachmoiLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jLabel16)
                        .add(jScrollPane4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 56, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
        );

        PanelKhachQuen.setBorder(javax.swing.BorderFactory.createTitledBorder("Danh s\u00e1ch kh\u00e1ch h\u00e0ng"));
        PanelKhachQuen.setEnabled(false);
        jLabel13.setText("Nh\u1eadp t\u00ean");

        Timtenkhach.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                TimtenkhachKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                TimtenkhachKeyReleased(evt);
            }
        });

        jButton1.setText("T\u00ecm");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        Bangkhachhang.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        Bangkhachhang.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                BangkhachhangMouseClicked(evt);
            }
        });

        jScrollPane3.setViewportView(Bangkhachhang);

        org.jdesktop.layout.GroupLayout PanelKhachQuenLayout = new org.jdesktop.layout.GroupLayout(PanelKhachQuen);
        PanelKhachQuen.setLayout(PanelKhachQuenLayout);
        PanelKhachQuenLayout.setHorizontalGroup(
            PanelKhachQuenLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(PanelKhachQuenLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel13)
                .add(15, 15, 15)
                .add(Timtenkhach, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 160, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(29, 29, 29)
                .add(jButton1)
                .addContainerGap(250, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 557, Short.MAX_VALUE)
        );
        PanelKhachQuenLayout.setVerticalGroup(
            PanelKhachQuenLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(PanelKhachQuenLayout.createSequentialGroup()
                .add(PanelKhachQuenLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel13)
                    .add(Timtenkhach, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButton1))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, PanelKhachQuen, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(PanelKhachmoi, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 573, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 78, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachmoi, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 327, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PanelKhachQuen, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pack();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        java.awt.Dimension dialogSize = getSize();
        setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
         new publicClass().addItemToTable(Bangkhachhang,"select * from cusjointype where [Họ Tên] like N'%"+Timtenkhach.getText()+"%'");
          new publicClass().hiddencol(Bangkhachhang,0);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void TimtenkhachKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_TimtenkhachKeyReleased
// TODO add your handling code here:
         new publicClass().addItemToTable(Bangkhachhang,"select * from cusjointype where [Họ Tên] like N'%"+Timtenkhach.getText()+"%'");
          new publicClass().hiddencol(Bangkhachhang,0);
    }//GEN-LAST:event_TimtenkhachKeyReleased

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void TimtenkhachKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_TimtenkhachKeyPressed
// TODO add your handling code here:
          new publicClass().addItemToTable(Bangkhachhang,"select * from cusjointype where [Họ Tên] like N'%"+Timtenkhach.getText()+"%'");
          new publicClass().hiddencol(Bangkhachhang,0);
    }//GEN-LAST:event_TimtenkhachKeyPressed

    private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton1ActionPerformed
// TODO add your handling code here:
       
      
            if (customerId.getText().equals(" ")) 
            {
                if ((firstName.getText().equals(""))||(lastName.getText().equals("")))
                {
                JOptionPane.showMessageDialog(this,"Bạn phải nhập họ và tên của khách hàng");
                
                }
                else
                {
                    InsertNewCustomer();
                    CreaterOrder(customerId.getText());
                    AddCusInorder(customerId.getText(),orderId.getText());
                    unfillAllFeid();
                    JOptionPane.showMessageDialog(this,"Bạn vừa tạo thành công 1 đơn hàng");
                    this.dispose();
                }
                
            }
            else
            {
                //UpdateCustomer(customerId.getText());
                CreaterOrder(customerId.getText());
                AddCusInorder(customerId.getText(),orderId.getText());
                unfillAllFeid();
                 JOptionPane.showMessageDialog(this,"Bạn vừa tạo thành công 1 đơn hàng");
                 this.dispose();
            }
           
      
    }//GEN-LAST:event_jToggleButton1ActionPerformed
                    
    private void firstNameKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_firstNameKeyTyped
// TODO add your handling code here:
        if (Khachcu.isSelected()){
            addItemToTable(Bangkhachhang,"select * from cusjointype where firstname like '%"+firstName.getText()+"%' or lastname like '%"+lastName.getText()+"%'");
            
        }
    }//GEN-LAST:event_firstNameKeyTyped
        
    private void BangkhachhangMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BangkhachhangMouseClicked
// TODO add your handling code here:
        Makhachhang= SelectedRowToString(Bangkhachhang,0);
        fillAllFeid();
        //Khachcu.setSelected(true);
        
        
        
    }//GEN-LAST:event_BangkhachhangMouseClicked
        
    private void KhachmoiMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_KhachmoiMouseClicked
// TODO add your handling code here:
        PanelKhachQuen.setVisible(false);
        unfillAllFeid();
        
        
    }//GEN-LAST:event_KhachmoiMouseClicked
    
    private void KhachcuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_KhachcuMouseClicked
// TODO add your handling code here:
        // type.removeAllItems();
        //  addItemTooCombobox(type,"select name from customerstype","");
        unfillAllFeid();
        addItemToTable(Bangkhachhang,"select * from cusjointype");
        new publicClass().hiddencol(Bangkhachhang,0);
        PanelKhachQuen.setVisible(true);
       // if (Khachcu.isSelected()) {
         //   new searchCustomers().setVisible(true);
       // }
        //customerId.setText("");
    }//GEN-LAST:event_KhachcuMouseClicked
    private void DeleteCustomer(String cusId){
        if (Makhachhang!=null){
            int rt= JOptionPane.showConfirmDialog(this,"Bạn thực sự muốn xóa khách hàng có mã :"+Makhachhang+"\n tất cả các đơn hàng liên quan sẽ bị xóa","Cảnh báo",0);
            if (rt ==0) {
                int mkh = Integer.parseInt( customerId.getText());
                int mkhselect = Integer.parseInt(cusId);
                if  (mkh ==mkhselect){
                    unfillAllFeid();
                    addItemToTable(Bangkhachhang,"select * from cusjointype");
                }
                SQLRUN("clearorderofcus '"+cusId+"'") ;
                addItemToTable(Bangkhachhang,"select * from cusjointype");
                
            }
            
            Makhachhang=null;
            
        } else {
            JOptionPane.showMessageDialog(this,"Bạn phải chọn 1 khách để xóa");
        }
    }
    
    
    private void InsertNewCustomer() {
        
        String gioi ="";
        String cusType ="";
        cusType = selectDateToString("select customerTypeId from customerstype where name  =N'"+type.getSelectedItem().toString()+"'","customerTypeId");
        if (sexMale.isSelected()){gioi="Nam";
        }
        if (sexFemale.isSelected()){gioi="Nu";
        }
        
        String sql= "insert into customers (firstname,lastname,type,idCardNumb,visaCardNumb,sex,age,address,phone,email,country,detail)" +
                " values (N'"+firstName.getText()+"',N'"+lastName.getText()+"','"+cusType+"','"+idCardNumb.getText()+"',N'"+visaCardNumb.getText()+"','"+gioi+"','"+age.getText()+"',N'"+address.getText()+"','"+
                phone.getText()+"','"+email.getText()+"',N'"+country.getText()+"',N'"+detail.getText()+"')" ;
       // JOptionPane.showMessageDialog(this,sql);
        SQLRUN(sql);
        String GetCuid = selectDateToString("select max (customerid)as customerid from customers ","customerid");
        customerId.setText(GetCuid);
        
        
    }
    
    private void UpdateCustomer(String cusId){
       
            String gioi ="";
            String cusType ="";
            cusType = selectDateToString("select customerTypeId from customerstype where name  =N'"+type.getSelectedItem().toString()+"'","customerTypeId");
            if (sexMale.isSelected()){gioi="Nam";
            }
            if (sexFemale.isSelected()){gioi="Nu";
            }
            
            String sqlupdate ="update customers set firstname=N'"+firstName.getText()+"',lastname=N'"+lastName.getText()+"', type='"+cusType+"',idCardNumb='"+idCardNumb.getText()+"', visaCardNumb=N'"+
                    visaCardNumb.getText()+"',sex='"+gioi+"',age='"+age.getText()+"',address=N'"+address.getText()+"',phone='"+phone.getText()+
                    "',email='"+email.getText()+"',country=N'"+country.getText()+"',detail=N'"+detail.getText()+"' where customerid='"+cusId+"'";
            SQLRUN(sqlupdate);
            //JOptionPane.showMessageDialog(this,sqlupdate);
            
      
        
    }
    private void CreaterOrder(String MaKhach) {
        
            String odType ="";
            odType = selectDateToString("select statusid from order_status  where status_detail =N'"+orderType.getSelectedItem().toString()+"'","statusid");
            String  sql2 = "insert into orders (customerId,Status,note,orderDate) values ('"+customerId.getText()+"','"+odType+"',N'"+Note.getText()+"',getDate())";
            SQLRUN(sql2);
            //JOptionPane.showMessageDialog(this,sql2);
            //SQLRUN("");
            String GetOdid =  selectDateToString("select max (orderid)as orderid from orders ","orderid");
            orderId.setText(GetOdid);
            if (roomArray != null )// khi da chon room
            {
                
                String CountDays = new publicClass().selectDateToString("select convert(int,'"+begindate.getText()+"'-getDate()) as countDay","countDay");
               // JOptionPane.showMessageDialog(this,CountDays);
                if (new Integer(CountDays)>0)
                { 
                    RoomStatusID="8";
                   
                }
                else
                {
                    RoomStatusID="6";
                }
                
                for (int i=0; i < roomArray.size() ; i++) {
                
                
                String insertOrderDetail =" insert into orderDetail (roomid,orderid,begindate,enddate,roomStatus) values ('"+
                            roomArray.get(i).toString()+ "','"+GetOdid+"','"+begindate.getText()+"','"+enddate.getText()+"','"+RoomStatusID+"')";
                    SQLRUN(insertOrderDetail);
                    //JOptionPane.showMessageDialog(this,insertOrderDetail);
                }
                
            }
           // AddCusInorder(customerId.getText(),GetOdid);
           // addItemToTable(Bangkhachhang ,"select * from customers where customerid in " +
                //    "(select customerid from cusinorders where orderid='"
                //    +orderId.getText()+"' ) ");
           // PanelKhachQuen.setVisible(true);
            //askForAdd(type.getSelectedItem().toString(),1);
        
    }
    
    private void AddCusInorder(String CusID,String OID) {
       
            String sqlin="insert into cusInOrders (customerid,orderid) values ('" +
                    CusID+"','"+OID+"')";
            //JOptionPane.showMessageDialog(this,sqlin);
            SQLRUN(sqlin);
      
    }
    
    private void UpdateRespnseInOrder(String cusId,String note,String oId) {
        if ((cusId.equals(""))&&(oId.equals(""))){
            String insertorder ="update orders set customerid ='"+cusId+"',note=N'"+note+"' where orderid='"+oId+"'";
            //JOptionPane.showMessageDialog(this,insertorder);
        } else {
            JOptionPane.showMessageDialog(this,"Chưa có mã đơn và mã khách để cập nhật");
        }
    }
    private  void askForAdd(String cusType,int checktye ) {
        String typeid =selectDateToString("select  customertypeid from customerstype where name ='"+cusType+"'","customertypeid");
        if (Integer.parseInt(typeid) != 1) {
            int tl= JOptionPane.showConfirmDialog(this,"Khách này không đi một mình, bạn có muốn thêm khách vào không?","Thong bao",0);
            if (tl==0){
                unfillAllFeid();
                Khachmoi.setSelected(true);
                isaddnew =true;
                type.removeAllItems();
                addItemTooCombobox(type,"select name from customerstype where customertypeid='"+typeid+"'","");
                
            } else {
                this.dispose();
            }
        }
    }
    
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                //new createOrderNew(String begindate, String enddate,Vector vt).setVisible(true);
            }
        });
    }
    // --
    // COPY Tu day di tat ca cac form
                                  /* import cac goi nay
                                    import java.sql.Connection;
                                    import java.sql.ResultSet;
                                    import java.sql.ResultSetMetaData;
                                    import java.sql.Statement;
                                    import javax.swing.JOptionPane;
                                    import javax.swing.JTable;
                                    import javax.swing.JTextField;
                                   
                                   */
    public void SQLRUN(String SQLTEXT) // Ham de chay cau truy van
    {
        try{
            Connection   conn = new connectDatabase().getConnection();
            Statement stm = conn.createStatement();
            stm.execute(SQLTEXT);
            conn.close();
            stm.close();
            System.out.println(SQLTEXT);
        } catch(Exception e){
            e.printStackTrace();
        }
    }
    public String  SelectedRowToString(JTable TableName, int CollNumb ) // Lay va In ten truong thu CollNumb ra  bietn ReturnValua, lay 1 bien
    {
        //int CollNumb ;
        //CollNumb=0;
        int  RowSelected;
        String ReturnValue;
        RowSelected = TableName.getSelectedRow();
        ReturnValue=TableName.getValueAt(RowSelected,CollNumb).toString();
        System.out.println(ReturnValue+" ");
        return ReturnValue;
        //System.out.println(TableName.getValueAt(RowSelected,CollNumb));
        
    }
    public void addItemTooCombobox(JComboBox ComboboxName,String sqlcb,String Firstchoice) // Dua du lieu tu cau truy van vao combobox, chi co 1 truong trong du lieu
    {
        //String sqlcb = "select TenTruogn from TenBang";
        //ComboboxName.addItem("Chon 1");
        if (Firstchoice !=""){
            ComboboxName.addItem(Firstchoice);
        }
        new sqlDatabase().addDataCombobox(sqlcb,ComboboxName);
    }
    
    public void addItemToTable(JTable TableName,String sqltb )// Lay du lieu tu cau truy van dua vao tabe, nhieu ten bang
    {
        
        //String sqltb=  "select * from Tenbang";
        new sqlDatabase().addDataTable(sqltb,TableName);
        
    }
    
    public void addDataToTextField(String sql,String rsName,JTextField TexFiedName) // dua du lieu tu trong cau truy van vao bang
    {
        //Connection con =null;
        if(con == null){
            con = new connectDatabase().getConnection();
        }
        try{
            Statement sttm = con.createStatement();
            ResultSet rs = sttm.executeQuery(sql);
            while(rs.next()){
                TexFiedName.setText(rs.getString(rsName));
            }
            sttm.close();
            rs.close();
        } catch(Exception e){
            e.printStackTrace();
        }
    }
    public String selectDateToString(String sql,String rsName) // dua du lieu tu trong cau truy van ra bien string
    {
        String returnvl ="" ;
        //Connection con =null;
        if(con == null){
            con = new connectDatabase().getConnection();
        }
        try{
            Statement sttm = con.createStatement();
            ResultSet rs = sttm.executeQuery(sql);
            while(rs.next()){
                System.err.println(rs.getString(rsName));
                returnvl = rs.getString(rsName);
            }
            sttm.close();
            rs.close();
        } catch(Exception e){
            e.printStackTrace();
        }
        return returnvl;
    }
    
    
    //  Copy tu day di tat ca cac form
    private void unfillAllFeid(){
        //type.removeAllItems();
        // addItemTooCombobox(type,"select name from customerstype","");
        addDataToTextField("select max(customerId)+1 as customerId from customers ","customerId",customerId);
        customerId.setText(" ");
        firstName.setText("");
        lastName.setText("");
        idCardNumb.setText("");
        visaCardNumb.setText("");
        age.setText("");
        country.setText("");
        address.setText("");
        phone.setText("");
        email.setText("");
        detail.setText("");
        sexMale.setSelected(true);
        
    }
    private void fillAllFeid(){
        // Connection con = null ;
        String sql1 ="select * from customers where customerid= '"+Makhachhang+"'" ;
        String sql2 ="select customerId,firstname,lastname,idCardNumb,visaCardNumb,age,address,phone,email,country,detail from customers where customerid= '"+Makhachhang+"'" ;
        
        if(con == null){
            con = new connectDatabase().getConnection();
        }
        try{
            
            Statement sttm1 = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                    
            ResultSet rs1 = sttm1.executeQuery(sql2);
            while (rs1.next()){
                customerId.setText(rs1.getString("customerId"));
                firstName.setText(rs1.getString("firstName"));
                lastName.setText(rs1.getString("lastName"));
                
                idCardNumb.setText(rs1.getString("idCardNumb"));
                visaCardNumb.setText(rs1.getString("visaCardNumb"));
                  
                age.setText(rs1.getString("age"));
                address.setText(rs1.getString("address"));
                phone.setText(rs1.getString("phone"));
                email.setText(rs1.getString("email"));
                country.setText(rs1.getString("country"));
                detail.setText(rs1.getString("detail"));
                
           
           }
            sttm1.close();
            rs1.close();
            Statement sttm2 = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
            ResultSet rs2 = sttm2.executeQuery(sql1);
            while(rs2.next()){
                // dua du lieu vao cac truong
               
                type.removeAllItems();
                addItemTooCombobox(type,"select name from customerstype where customerTypeId='"+rs2.getString("type")+"'","");
                addItemTooCombobox(type,"select name from customerstype where customerTypeId <>'"+rs2.getString("type")+"'","");
                
                if (rs2.getString("sex").equals("Nam")){
                    System.out.println(rs2.getString("sex"));
                    sexMale.setSelected(true);
                    
                }
                if (rs2.getString("sex").equals("Nu")){
                    System.out.println(rs2.getString("sex"));
                    sexFemale.setSelected(true);
                    
                }
              
                
                // hoan tat dua du lieu vao cac truong
            }
            
            sttm2.close();
           
            rs2.close();
        } catch(Exception e){
            e.printStackTrace();
        }
    }
    
    // bien tu tao
    String Makhachhang;
    Connection con ;
    boolean isaddnew = false;
    private String RoomStatusID;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTable Bangkhachhang;
    private javax.swing.ButtonGroup CustomerOld;
    private javax.swing.ButtonGroup GioitinhG;
    private javax.swing.JRadioButton Khachcu;
    private javax.swing.JRadioButton Khachmoi;
    private javax.swing.JTextField Note;
    private javax.swing.JPanel PanelKhachQuen;
    private javax.swing.JPanel PanelKhachmoi;
    private javax.swing.JTextArea SelectedRoom;
    private javax.swing.JTextField Timtenkhach;
    private javax.swing.JTextArea address;
    private javax.swing.JTextField age;
    private javax.swing.JTextField begindate;
    private javax.swing.JTextField country;
    private javax.swing.JTextField customerId;
    private javax.swing.JTextArea detail;
    private javax.swing.JTextField email;
    private javax.swing.JTextField enddate;
    private javax.swing.JTextField firstName;
    private javax.swing.JTextField idCardNumb;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JToggleButton jToggleButton1;
    private javax.swing.JTextField lastName;
    private javax.swing.JTextField orderId;
    private javax.swing.JComboBox orderType;
    private javax.swing.JTextField orderdate;
    private javax.swing.JTextField phone;
    private javax.swing.JRadioButton sexFemale;
    private javax.swing.JRadioButton sexMale;
    private javax.swing.JComboBox type;
    private javax.swing.JTextField visaCardNumb;
    // End of variables declaration//GEN-END:variables
    
}
